function Question(question, isOwner) {
	var self = this;
	
	self.questionDescription = ko.observable(question.description);
	self.questionFormattedDate = ko.observable(question.formattedDate);
	self.answer = ko.observable();
	self.answerFormattedDate = ko.observable();
	self.questionSource = question.questionSource;
	self.productId = question.questionableObject.entityId;
	self.hasAnswers = ko.computed(function() {
		return self.answer() != undefined;
	});
	
	self.newAnswer = ko.observable("");
	
	self.mustShowAnswerInput = ko.computed(function() {
		return !self.hasAnswers() && isOwner;
	}, self);
	
	self.createAnswer = function() {
		if(self.newAnswer()) {
			getService("question/answerProductQuestion", { "questionId": question.id, "answer" : self.newAnswer() }, self.answerSuccess);
		} else {
			alert("Por favor escribe una respuesta");
		}
	};
	
	self.answerSuccess = function(answer) {
		self.answer(answer.description);
	};
	
	self.goToDetail = function() {
		redirect('product/detail/' + self.productId + '/' + self.questionSource.replaceAll(' ', '-'));
	};
	
	if(question.answers.elements.length > 0) {
		self.answer(question.answers.elements[0].description);
		self.answerFormattedDate(question.answers.elements[0].formattedDate);
	}
}